<?php
    include "admin_users.php";

$id=$_REQUEST['id'];
$img=$_REQUEST['img'];
$petname=$_REQUEST['petname'];
$gender=$_REQUEST['gender'];
$signature=$_REQUEST['signature'];
$phone=$_REQUEST['phone'];
$address=$_REQUEST['address'];
// var_dump($id,$img,$petname,$gender,$signature,$phone,$address);

mysqli_select_db($conn,"shopping");

   $sql = "update users set img='$img',petname='$petname',gender='$gender',signature='$signature',phone='$phone',address='$address' where id='$id'";  //SQL模板

   $result=mysqli_query($conn,$sql);

    if (!$result){
        echo '个人资料修改失败！';
    }else{
        echo '个人资料修改成功！';
    }
    
    mysqli_close($conn);
?>
